<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const goHome = () => {
  router.push('/')
}
</script>
<template>
  <div class="home">
    <div class="header">
      <div class="back-box" @click="goHome">主页</div>
      webrtc音视频示例
    </div>
    <div class="content">
      <div class="left">
        <div class="title">摄像头</div>
      </div>
      <div class="center"></div>
      <div class="right">
        <div class="title">用户列表</div>
      </div>
    </div>
  </div>
</template>
<style scoped lang="scss">
.home {
  width: 100vw;
  height: 100vh;
  background-color: #1e2831;
  color: #f5f5f5;
  font-size: 14px;
  .header {
    height: 50px;
    width: 100%;
    background-color: rgb(48, 64, 81);
    text-align: center;
    line-height: 50px;
    .back-box {
      position: absolute;
      height: 50px;
      padding: 0 10px;
      cursor: pointer;
    }
  }
  .content {
    height: calc(100% - 50px);
    padding: 5px;
    display: flex;
    .title {
      background-color: rgb(48, 64, 81);
      height: 35px;
      line-height: 35px;
      text-align: center;
      font-size: 12px;
    }
    .left {
      height: 100%;
      width: 300px;
      background-color: #28333d;
    }
    .center {
      margin: 0 5px;
      flex: 1;
      background-color: #28333d;
    }
    .right {
      width: 300px;
      background-color: #28333d;
    }
  }
  .box {
    width: 150px;
    height: 150px;
    border-radius: 4px;
    margin: 0 20px;
    line-height: 150px;
    text-align: center;
    background-color: #28333d;
    cursor: pointer;
    &:hover {
      background-color: rgb(48, 64, 81);
    }
  }
}
</style>
